bg

Description:

“The color to be used for the background.”

Mnemonic:

BackGround

set.seed(3-31-2016)
opar <- par(no.readonly=TRUE)
par(bg = "blue")
plot(rnorm(100))

par(bg = "#F0F0F0")
plot(rnorm(100))

par(bg = "#DCE6EC")
plot(rnorm(100))

bty

Description:

“A string which determines the type of box which is drawn around plots.”

Mnemonic:

Box TYpe

par(bty = "o")
plot(rnorm(100))

par(bty = "l")
plot(rnorm(100))

par(bty = "7")
plot(rnorm(100))

par(bty = "c")
plot(rnorm(100))

par(bty = "u")
plot(rnorm(100))

par(bty = "]")
plot(rnorm(100))

par(bty = "n")
plot(rnorm(100))

cex

Description:

“A number specifiying the amount by which plotting text and symbols should be magnified.”

Mnemonic:

Character EXpansion

par(cex = 2)
plot(rnorm(100))

par(cex = .5)
plot(rnorm(100))

cex.axis

Description:

“A number specifiying the amount by which plotting text and symbols should be magnified.”

Mnemonic:

Character EXpansion

par(cex = 1, cex.axis = 0.5)
plot(rnorm(100))

par(cex = 1, cex.axis = 2)
plot(rnorm(100))

cex.main

par(cex = 1, cex.main = 0.5)
plot(rnorm(100))

par(cex = 1, cex.main = 2)
plot(rnorm(100))

family

Description:

“The name of a font family for drawing text.”

par(family = "mono")
plot(rnorm(100))

par(family = "serif")
plot(rnorm(100))

fg

Description:

“The color to be used for the foreground of plots.”

Mnemonic:

ForeGround

par(fg = "red")
plot(rnorm(100))

font

Description:

“An integer which specifies which font to use.”

par(font = 2)
plot(rnorm(100))
mtext("Text")

par(font = 3)
plot(rnorm(100))
mtext("Text")

par(font = 4)
plot(rnorm(100))
mtext("Text")

par(font = 5)
plot(rnorm(100))
mtext("Text")

lab

Description:

“A numerical vector of the form c(x, y, len) which modifies the default way that axes are annotated.”

Mnemonic:

LABel length

par(lab = c(10, 3, 7))
plot(rnorm(100))

par(lab = c(40, 20, 7))
plot(rnorm(100))

las

Description:

“The style of axis labels.”

Mnemonic:

LAbel Style

par(las = 0)
plot(rnorm(100))

par(las = 1)
plot(rnorm(100))

par(las = 2)
plot(rnorm(100))

par(las = 3)
plot(rnorm(100))

lty

Description:

“The line type.”

Mnemonic:

Line TYpe

plot(rnorm(100), type = "l", lty = 2)

plot(rnorm(100), type = "l", lty = 3)

plot(rnorm(100), type = "l", lty = 6)

lwd

Description:

“The line width.”

Mnemonic:

Line WiDth

plot(rnorm(100), type = "l", lwd = 1)

plot(rnorm(100), type = "l", lwd = 2)

plot(rnorm(100), type = "l", lwd = 5)

mai

Description:

“The margin size.”

Mnemonic:

MArgin sIze

par(mai = c(0, opar$mai[2:4]))
plot(rnorm(100))

par(mai = c(opar$mai[1], 0, opar$mai[3:4]))
plot(rnorm(100))

par(mai = c(opar$mai[1:2], 0, opar$mai[4]))
plot(rnorm(100))

par(mai = c(opar$mai[1:3], 0))
plot(rnorm(100))

mar

Description:

“The number of margin lines on the four sides of the plot.”

Mnemonic:

MARrgin lines

par(mar = c(0, 4, 4, 2) + 0.1)
plot(rnorm(100))

par(mar = c(5, 0, 4, 2) + 0.1)
plot(rnorm(100))

par(mar = c(5, 4, 0, 2) + 0.1)
plot(rnorm(100))

par(mar = c(5, 4, 4, 0) + 0.1)
plot(rnorm(100))

mfrow

Description:

“A vector of the form c(nr, nc). Subsequent figures will be drawn in an nr-by-nc array by columns (mfcol), or rows (mfrow), respectively.”

Mnemonic:

par(mfrow = c(2, 2))
replicate(4, plot(rnorm(100)))

## [[1]]
## NULL
## 
## [[2]]
## NULL
## 
## [[3]]
## NULL
## 
## [[4]]
## NULL
par(mfrow = c(2, 1))
replicate(2, plot(rnorm(100)))

## [[1]]
## NULL
## 
## [[2]]
## NULL
par(mfrow = c(1, 2))
replicate(2, plot(rnorm(100)))

## [[1]]
## NULL
## 
## [[2]]
## NULL
par(mfrow = c(3, 2))
replicate(6, plot(rnorm(100)))

## [[1]]
## NULL
## 
## [[2]]
## NULL
## 
## [[3]]
## NULL
## 
## [[4]]
## NULL
## 
## [[5]]
## NULL
## 
## [[6]]
## NULL

tcl

Description:

“The length of tick marks as a fraction of the height of a line of text.”

Mnemonic:

TiCk Line

par(tcl = 1)
plot(rnorm(100))

par(tcl = -1)
plot(rnorm(100))

par(tcl = -0.1)
plot(rnorm(100))